<template>
	<view class="agentFansListPage">
		<view>
			<scroll-view scroll-x class="bg-white nav ">
				<view class="cu-item" :class="index == curTab ? 'text-blue cur' : ''" v-for="(item, index) in tabsList" :key="index" @tap="tabChange(index)" :data-id="index">
					{{ item.title }}
				</view>
			</scroll-view>
		</view>
		<view>
			<uni-list>
				<uni-list-item class="fans" v-for="(item, index) in curList" :key="index" clickable :show-arrow="false" :show-extra-icon="false" @click="onClickItem(item)">
					<view class="content padding-tb-sm">
						<view class="text-lg">
							<text class="cuIcon-people " :class="[item.gender == 1 ? 'text-blue' : 'text-red']"></text>
							{{ item.nicknameStr }}
						</view>
						<view class="text-gray text-sm">
							<text class="cuIcon-location"></text>
							{{ item.country ? item.country : '' }}{{ item.province ? item.province : '' }}{{ item.city ? item.city : '' }}
						</view>
					</view>
				</uni-list-item>
			</uni-list>
		</view>
	</view>
</template>

<script>
let scrollTimer = null;
export default {
	data() {
		return {
			tabsList: [
				{
					title: '全部粉丝'
				},
				{
					title: '客户粉丝'
				}
			],
			curTab: 0,
			curList: [],
			vipList: [],
			fansList: [],
			pageScrollTop: 0,
			pageSize: 10,
			pageIndexVIP: 1,
			pageIndexFans: 1
		};
	},
	onPageScroll(obj) {
		if (scrollTimer) {
			clearTimeout(scrollTimer);
			scrollTimer = setTimeout(() => {
				this.pageScrollTop = obj.scrollTop;
			}, 500);
		} else {
			scrollTimer = setTimeout(() => {
				this.pageScrollTop = obj.scrollTop;
			}, 500);
		}
	},
	onReachBottom() {},
	methods: {
		tabChange(index) {
			this.curTab = index;
		},
		onClickItem(item) {}
	}
};
</script>

<style lang="less">
	
	.cu-item{
		width:50%;
		text-align: center;
	}
		
</style>
